put the number of lines in card field id 10 into card field id 16
put (the number of cards - 2) into card field id 17
hide card button id 12
hide card button id 13
hide card field id 10
hide card field id 11
show card button 6
set the scroll of card field 1 to 0
if card field 2 is empty then
answer "Please set parameters (see instructions)" with "OK"
end if
end openCard
on idle
put the date into card field 10
put the short time into card field 11
pass idle
end idle
-- part 1 (button)
-- low flags: 00
-- high flags: 2003
-- rect: left=10 top=10 right=44 bottom=52
-- title width / last selected line: 0
-- icon id / first selected line: 20098 / 20098
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
if the userLevel > 2 then
domenu "Compact Stack"
end if
go home
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=4 top=50 right=104 bottom=57
-- title width / last selected line: 0
-- icon id / first selected line: 1001 / 1001
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Get Mail
----- HyperTalk script -----
on mouseUp
put "Reading mail..." into msg
set cursor to busy
show msg
wait 5 seconds
set the lockscreen to true
--get filenames from mail sub-directory
put rfiles(card field 8,"TEXT") into source
if source is empty then exit mouseUp
repeat with x=1 to the number of lines in source
if line x of source contains "LOGIN" then next repeat
put line x of source into fName
put card field 8 & ":" & fName into fileNm
put 1 into lineNr
put "Unknown" into UserID
repeat for the number of lines in card field 4
if fName contains line lineNr of card field 4 then
get line lineNr of card field 4
put it into uName
get line lineNr of card field 3
put it into UserID
exit repeat
else
add 1 to lineNr
end if
end repeat
go to first card of bkgnd id 2608
doMenu "New Card"
put uName into bkgnd field 5
put UserID into bkgnd field 2
open file fileNm
read from file fileNm until "─▒"
put it into temp
get the number of lines in temp
put it into linecount
get line 1 of temp
put it into bkgnd field 3
repeat with temp2=2 to linecount
get line temp2 of temp
put StripChar(it,"
") & return after bkgnd field "Letter"
end repeat
close file fileNm
if fName <> "LOGIN" then
put DeleteFile(fileNm) into err
end if
go to first card
add 1 to card field 6
end repeat
--end of loop to get and read files
hide msg
play "harsichord" 75
go to first card
set cursor to arrow
set the lockscreen to false
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=5 top=120 right=176 bottom=57
-- title width / last selected line: 0
-- icon id / first selected line: 27009 / 27009
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: View...
----- HyperTalk script -----
on mouseUp
set lockscreen to true
go next card
go next card
set lockscreen to false
end mouseUp
-- part 4 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=61 top=202 right=300 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 5 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=5 top=189 right=247 bottom=60
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Select
----- HyperTalk script -----
on mouseUp
set cursor to 4
set lockscreen to true
sort by bkgnd field 3
--put empty into card field "container"
go next card
go next card
repeat for the number of cards-1
put (line 1 of bkgnd field id 3 & return) after var1
go next card
end repeat
go to first card
put var1 into bkgnd field 1
set lockscreen to false
set cursor to 1
play "Click"
ShowDialog 7,5002," Select mail",geneva,9,bkgnd field 1,1
put the result into lnVar
if (lnVar is empty) or (lnVar is "Cancel") then
go to first card
set the lockscreen to false
play "harpsichord" 75
exit mouseUp
end if
put line lnVar of bkgnd field 1 into lnSelect
set lockscreen to true
go next card
repeat for the number of cards
if bkgnd field id 3 contains lnSelect then
set lockscreen to false
exit mouseUp
else
go next card
end if
end repeat
go first card
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=61 top=29 right=52 bottom=210
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Network mail path...
----- HyperTalk script -----
on mouseUp
ask "What is the path for network mail?"
put it into card field id 7
get card field id 7
put it into PathName
get card field id 19
put ":" & it after PathName
put PathName into card field 8
StdFile(PathName)
end mouseUp
-- part 7 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=209 top=29 right=51 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 9 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=201 top=132 right=157 bottom=338
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Set Network Users
----- HyperTalk script -----
on mouseUp
hide card field 10
hide card field 11
show button id 12
show button id 13
show card field id 10
show card field id 11
hide me
end mouseUp
-- part 10 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=62 top=158 right=299 bottom=284
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Users
-- part 11 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=283 top=158 right=300 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: IDs
-- part 12 (button)
-- low flags: 80
-- high flags: A004
-- rect: left=93 top=135 right=158 bottom=234
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Enter User Names
----- HyperTalk script -----
on mouseUp
hide card button id 12
hide card button id 13
hide card field id 10
hide card field id 11
show card field 10
show card field 11
show card button 6
end mouseUp
-- part 13 (button)
-- low flags: 80
-- high flags: A004
-- rect: left=320 top=136 right=159 bottom=461
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Enter User ID's
----- HyperTalk script -----
on mouseUp
hide card button id 12
hide card button id 13
hide card field id 10
hide card field id 11
show card field 10
show card field 11
show card button 6
end mouseUp
-- part 16 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=213 top=107 right=127 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Users
-- part 17 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=454 top=108 right=126 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: MailNr
-- part 18 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=61 top=51 right=74 bottom=210
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Your mail folder...
----- HyperTalk script -----
on mouseUp
ask "What is your folder for network mail?"
put it into card field id 19
get card field id 7
put it into PathName
get card field id 19
put ":" & it after PathName
put PathName into card field 8
StdFile(PathName)
end mouseUp
-- part 19 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=209 top=51 right=73 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 20 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=208 top=80 right=101 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name:
-- part 21 (field)
-- low flags: 81
-- high flags: 0007
-- rect: left=182 top=158 right=298 bottom=267
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 25 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=5 top=259 right=317 bottom=60
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Send...
----- HyperTalk script -----
on mouseUp
set lockscreen to true
ShowDialog 7,5002,"Send mail to:",geneva,9,card field 3,1
put the result into lnVar
if lnVar is empty then exit mouseUp
get line lnVar of card field 3
put it into uName
show msg
put it into userID
put "Looking for user ID information..."
go to first card
if uName is not in card field 3 then
put "ID for this person is not present." into msg
play harpsichord "g"
set the lockscreen to false
repeat for 5000
end repeat
hide msg
exit mouseUp
end if
put 1 into lineNr
repeat for the number of lines in card field 3
if line lineNr of card field 3 = uName then
get line lineNr of card field 4
put it into uID
end if
add 1 to lineNr
end repeat
go to card 2
hide msg
doMenu "New Card"
ask "Enter subject of message:"
if it is empty then
doMenu "Delete Card"
go first card
set lockscreen to false
exit mouseUp
end if
send mouseUp to bkgnd button 6
put uName into bkgnd field 2
put uID into bkgnd field 5
put it into bkgnd field 3
set lockscreen to false
exit mouseUp
end mouseUp
-- part 26 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=370 top=172 right=189 bottom=502
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 2048
-- line height: 16
-- part name:
-- part 27 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=60 top=172 right=189 bottom=192
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 2048
-- line height: 16
-- part name:
-- part contents for card part 4
----- text -----
NetMail is a utility for reading network mail from the IBM side of a Novell network when using NetWare for the Macintosh and the Office Talk mail system (a shareware system available in the NOVA forum on CompuServe). It is capable of replying to mail ONLY IF your supervisor has given you rights to create and write to files in the mail directories of other users (this prevents you from reading their mail). If you do not have these rights, you should inform persons sending mail to you to indicate the name of the sender within the text of items sent, since this stack cannot determine the origin of mail.
Follow the directions below for use:
1] with the aid of your network supervisor, determine the folder (sub-directory) on your server where you mail resides;
2] select the "Network mail path..." button at the top of this card and CAREFULLY enter the path for the network mail system using the Macintosh convention (colons rather than back-slashes), for example:
SERVER_1:MAIL
Please note that this is the MAIN directory for the mail service, not the directory assigned to a specific person. Also, note that there is not a colon (:) following the last sub-directory (folder) name;
3] Click on the "Your mail folder..." button to enter the name of the sub-directory (folder) which is your personal mail area (the network supervisor can supply this);
4] Place this stack in a location where it can be accessed easily (usually in the same folder as Hypercard); and,
5] If your supervisor has given you rights in other persons mail areas as described above, set up the other users by selecting the "Set Network Users" button above. This will bring up two text entry areas for entering the user name and corresponding sub-directory for their mail. When entering this information, be absolutely certain that each entry (for both parameters) is on a separate line AND that the name and sub-directory entries are on the same lines (i.e., if you need to scroll one field to enter more information, scroll exactly the same number of lines in the other field, and enter the names and sub-directory information directly across from each other). Clicking on the "Enter User Names" or "Enter User ID's" buttons will close this area.
Daily use of the utility involves two steps:
1] after starting this stack, click on the "Get Mail" button (on the left side of this card) (this causes Hypercard to read AND DELETE your mail as you select each file shown);
[WARNING: Do NOT select the file called "LOGIN". While the system is designed to protect against deletion of this file, it's still not a good idea to select it.]
2] select the "View..." button below to read each item of mail.
The "Select" button will give you a list of the mail currently in the stack listed according to the subject rather than the sender. If you want to keep your mail here
(for storage), this listing facility will come in handy.
The "Kill" button on the individual mail cards will delete that mail from this stack (not from the server, since the mail was deleted at the time it was added to the stack).
At the bottom of each mail screen is a "Write/See Reply" button which will open a field in which you can reply to the item. Compose your reply in that area. If you have been given rights as previously mentioned (in other mail areas), you can then click on the "Send to:" button at the top of the screen in order to send the mail. Users will not be notified immediately of the mail they have received, but they will find it there when running the mail application.
(This has not been tested with all mail systems capable of running on the Novell network.) Please note that, when composing a reply, you must put a hard return (hit the return key) at the end of each line. Do NOT rely upon the word-wrapping within Hypercard.
The "Send..." button on the initial card will allow you to compose and send new mail to a user (if you have been granted the necessary rights to their mail directories and have entered the information described for "Set Network Users"). Selecting this button will produce a list of users from which to select your "target" for sending the mail. It will then ask you for the subject of your mail. After supplying this information, you will be brought to a new mail card. Here you can enter your message in the lower text entry field and proceed just as if you were writing a reply as described above. When you have finished composing your message, click on the "Send to" button. Office Talk will recognize this as new mail when that program is run by users on the PC side of the network.
NOTE: This stack is free. If you use it, I would appreciate E-mail on CompuServe notifying me of that fact and describing any problems you may have had. (E-mail address is shown in the lower right of this card.)